package com.jltx.xq.javajni;

import android.util.Log;

/**
 * @author jltxseo
 * Created by junlintianxia on 2019/05/06.
 */
public class JniThread {
    private static final String TAG = "JniThread";
    static {
        System.loadLibrary("ndkthread");
    }

    public static void onSuccess(String msg){
        Log.d(TAG,"onSuccess.msg:"+msg + Thread.currentThread().getName());
    }

    /**
     * 创建c++线程
     */
    public static native void createThread();

    /**
     * 在主线程调用onSuccess函数
     */
    public static native void callJavaMethodOnMainThread();

    /**
     * 在cpp子线程调用onSuccess函数
     */
    public static native void callJavaMethodOnChildThread();
}
